﻿<html>
<head>
<meta charset="UTF-8"/>
<title>Hello, Workers!</title>
<script type="text/javascript" src="../json2.js"></script>
<script type="text/javascript" src="../htaworkers.js"></script>
<script type="text/javascript">
function init() {
  document.getElementById("button1").attachEvent("onclick", run);
}
function run() {
  var worker = new Worker("hello-workers.js");
  worker.onmessage = function(event) {
    alert("result(10 * 2): " + event.data);
  }
  worker.postMessage(10);
}
window.attachEvent('onload', init);
</script>
</head>
<body>
<form name="form1">
<input type="button" id="button1" value="Execute!">
</form>
</body>
</html>
